<template>
  <z-block class="z-col right lis-jcsj-zksj-add-dx">
    <el-form inline>
      <el-form-item label="质控月份">
        <el-date-picker type="month" v-model="zkyf" format="YYYY/MM" value-format="YYYY/MM" />
      </el-form-item>
      <el-form-item>
        <el-button @click="add" type="primary" :disabled="edit">新增</el-button>
        <el-button @click="del" type="danger" :disabled="edit">删除</el-button>
        <el-button @click="save" type="primary" :disabled="edit">保存</el-button>
        <el-button @click="query" type="success" :disabled="edit">查询</el-button>
      </el-form-item>
    </el-form>
    <z-block class="bottom">
      <z-form-table
        ref="formTable"
        mainId="id"
        highlight-current-row
        border
        :cols="tableCols"
        :data="tableData"
        @current-change="currentRow = $event"
        @change="tableCellChange"
      ></z-form-table>
    </z-block>
  </z-block>
</template>
<script lang="ts" setup>
import { use } from './use'
import { zkbzAddEmits, zkbzAddProps } from '../zkbz-add-dl/prop'
import { tableCols } from '../zksj-add-dl/data'
defineOptions({
  name: 'lis-jcsj-zksj-add-dx'
})
const props = defineProps(zkbzAddProps)
const emit = defineEmits(zkbzAddEmits)
const { tableData, add, formTable, save, del, currentRow, query, zkyf, tableCellChange } = use(
  props,
  emit
)
</script>
